<HTML><HEAD><TITLE>viewable_type(++ViewableName, ?Type)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(viewable)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>viewable_type(++ViewableName, ?Type)</H1>
Query the type of an existent viewable.
<DL>
<DT><EM>ViewableName</EM></DT>
<DD>A string or atom: the name of an existent viewable
</DD>
<DT><EM>Type</EM></DT>
<DD>The type of the viewable. 
</DD>
</DL>
<H2>Description</H2>


        <p><B>NOTE:</B>When there are no registered visualisation clients,
        this predicate fails with all arguments, and has no effect.</P>

        <p>If <em>ViewableName</em> is the name of an existent viewable,
        <em>Type</em> is unified with its type. See
        <code>viewable_create/3</code> for a discussion of valid viewable
        types.</p>



<H3>Fail Conditions</H3>
Fails if ViewableName is not instantiated to the name of an existent viewable, or if Type fails to unify with the viewable's type.
<H3>Resatisfiable</H3>
no
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>ViewableName is not a string or an atom
</DL>
<H2>Examples</H2>
<PRE>

[Assuming that at least one visualisation client is registered]

	Success:

	viewable_create(v1, []([](R,S), [](Q,W)), 
			array([fixed, fixed], any)), 
	viewable_type(v1, X).

        [gives X = array([fixed, fixed], any)]


	Failure:

	viewable_create(v1, []([](R,S), [](Q,W)), 
		array([fixed, fixed], any)), 
	viewable_type(v1, q).


	Exceptions raised:

	viewable_create(v1, []([](R,S), [](Q,W)), 
		array([fixed, fixed], any)), 
	viewable_type(123, _).
        [gives error 4]

</PRE>
<H2>See Also</H2>
<A HREF="../../lib/viewable/viewable_create-3.html">viewable_create / 3</A>, <A HREF="../../lib/viewable/viewable_size-2.html">viewable_size / 2</A>, <A HREF="../../lib/viewable/viewable_expand-3.html">viewable_expand / 3</A>
</BODY></HTML>
